FROM kernelstudio/document-server-runtime:latest

ENV FLASK_APP=app.py

WORKDIR /app

RUN cd /app && mkdir -p /app/static /app/storage /app/logs

COPY ./ ./
COPY ./docker/entrypoint.sh /app/

RUN chmod +x /app/entrypoint.sh

ENTRYPOINT ["/bin/bash", "/app/entrypoint.sh"]